package com.neusoft.controller;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.neusoft.domain.Food;
import com.neusoft.service.FoodService;
import com.neusoft.service.impl.FoodServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("/FoodController")
public class FoodController {

    @Autowired
    FoodService foodService;

    @GetMapping("/listFoodByBusinessId")
    public List<Food> listFoodByBusinessId(Integer businessId)  {
         return foodService.listFoodByBusinessId(businessId);
    }
}
